package com.frame.num;


import java.util.Random;

public class NumberUtil {
	/**
	 * 自定义随机数方法
	 * 
	 * @return 返回对应位数的随机数
	 */
	public static String customNum(int minVal) {
		final int min = minVal;
		final int max = minVal * 10 - 1;
		Random rand = new Random();
		int tmp = Math.abs(rand.nextInt());
		return String.valueOf(tmp % (max - min + 1) + min);
	}

	public static String getOrderNumber(Integer persionType, Long userId){
		return System.currentTimeMillis() + "" + persionType + userId;

	}

	public static String getRunningNumber(Integer persionType, Long userId){
		return System.currentTimeMillis() + "" + persionType + userId;

	}


	public static void main(String[] args) {
		System.out.println(NumberUtil.customNum(100000000));
	}

}
